#include "Map.h"

using namespace car;

Map::Map( void )
{
}


Map::~Map( void )
{
}

MapList::MapList( void )
{
}

MapList::~MapList( void )
{
}

Map * MapList::getMap( unsigned int mapId )
{
	for( std::vector<Map>::iterator itr = mMapList.begin(); itr != mMapList.end(); ++itr )
	{
		if( ( *itr ).getMapId() == mapId )
		{
			return &( *itr );
		}
	}

	return NULL;
}

unsigned char MapList::getMaxCapacityOfMap( unsigned int mapId )
{
	for( std::vector<Map>::iterator itr = mMapList.begin(); itr != mMapList.end(); ++itr )
	{
		if( ( *itr ).getMapId() == mapId )
		{
			return ( *itr ).getMaxCapacity();
		}
	}

	//return 0;
	return 8;
}
